/*----------------------------------------------------------------------
 *
 * Copyright 2009, Thomas Dejanovic.
 *
 * This is free software; you can redistribute it and/or modify it
 * under the terms of the GNU Lesser General Public License as
 * published by the Free Software Foundation; either version 2.1 of
 * the License, or (at your option) any later version.
 *
 * This software is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this software; if not, write to the Free
 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
 * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
 *
 *---------------------------------------------------------------------
 *
 * low pin count bus definitions.
 *
 *---------------------------------------------------------------------*/



`ifndef LPCB_DEFINES

 `define LPCB_DEFINES

 `define LPCB_READ_SUB_OPCODE         4'h1 // 4'b0001
 `define LPCB_REPEAT_READ_SUB_OPCODE  4'h3 // 4'b0011
 `define LPCB_WRITE_SUB_OPCODE        4'h2 // 4'b0010
 `define LPCB_REPEAT_WRITE_SUB_OPCODE 4'h4 // 4'b0100
 `define LPCB_RESET_SUB_OPCODE        4'h5 // 4'b0101
 `define LPCB_ABORT_SUB_OPCODE        4'ha // 4'b1010

 `define LPCB_READ_OPCODE            8'h21 // 8'b0010 0001
 `define LPCB_READ_08_OPCODE         8'h61 // 8'b0110 0001
 `define LPCB_READ_16_OPCODE         8'ha1 // 8'b1010 0001
 `define LPCB_READ_32_OPCODE         8'he1 // 8'b1110 0001

 `define LPCB_REPEAT_READ_OPCODE     8'h23 // 8'b0010 0011
 `define LPCB_REPEAT_READ_08_OPCODE  8'h63 // 8'b0110 0011
 `define LPCB_REPEAT_READ_16_OPCODE  8'ha3 // 8'b1010 0011
 `define LPCB_REPEAT_READ_32_OPCODE  8'he3 // 8'b1110 0011

 `define LPCB_WRITE_OPCODE           8'h22 // 8'b0010 0010
 `define LPCB_WRITE_08_OPCODE        8'h62 // 8'b0110 0010
 `define LPCB_WRITE_16_OPCODE        8'ha2 // 8'b1010 0010
 `define LPCB_WRITE_32_OPCODE        8'he2 // 8'b1110 0010

 `define LPCB_REPEAT_WRITE_OPCODE    8'h24 // 8'b0010 0100
 `define LPCB_REPEAT_WRITE_08_OPCODE 8'h64 // 8'b0110 0100
 `define LPCB_REPEAT_WRITE_16_OPCODE 8'ha4 // 8'b1010 0100
 `define LPCB_REPEAT_WRITE_32_OPCODE 8'he4 // 8'b1110 0100

 `define LPCB_RESET_OPCODE  8'h55
 `define LPCB_ABORT_OPCODE  8'haa

 `define LPCB_RESET_CMD     4'h0
 `define LPCB_ABORT_CMD     4'h3
 `define LPCB_READ_ACK_CMD  4'h4

 `define LPCB_WRITE_8B_CMD  4'h8
 `define LPCB_WRITE_16B_CMD 4'h9
 `define LPCB_WRITE_24B_CMD 4'ha
 `define LPCB_WRITE_32B_CMD 4'hb

 `define LPCB_READ_8B_CMD   4'hc
 `define LPCB_READ_16B_CMD  4'hd
 `define LPCB_READ_24B_CMD  4'he
 `define LPCB_READ_32B_CMD  4'hf


`endif


/*----------------------------------------------------------------*/

// Local Variables:
// mode: verilog
// End:
